// app.js
App({
  onLaunch() {
    if (!wx.cloud) {
      console.error('请使用 2.2.3 或以上的基础库以使用云能力')
    } else {
      wx.cloud.init({
        // env: '你的环境ID',
        traceUser: true,
      })
    }

    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  globalData: {
    touxiang:'',
    host:{
      hostName:'',
      host_idt:'',
      room:[],
      houseSrc:[],
    },
    userId:'',
    orderId:'',
    renzheng:false,
    userInfo:{},
    carport:{},
    build:{
      name:'',
      location:'',
      louceng:'',
      price:'',
      photo:'',
    },
    user:{
      user_name:'',
      idt_num:'',
      tel_num:'',
      idt_card:'',
      state:1,
      idtBase64:'',
      intendCarportsId:''
    },
    url:'http://112.124.106.13:8000/prod-api'
  }
})
